package com.nuoniu.sibanyun.mapper.erp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.erp.ErpVoucherClass;
import com.nuoniu.sibanyun.entity.finance.VAccountingVoucherMain;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 凭证类别 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2021-03-31
 */
public interface ErpVoucherClassMapper extends BaseMapper<ErpVoucherClass> {

    @Select("select class_word,class_name,class_method,limit_type,adjustment_period,accounting_id,accounting_name from fab_voucher_type where company_id=1 and class_method=#{classMethod}")
    List<ErpVoucherClass> getDefaultList(Integer classMethod);

    @Select("select * from fag_voucher where v_class_id=#{id} and company_id=#{companyId}")
    List<VAccountingVoucherMain> getByVClass(Long id, Integer companyId);
}
